package com.future.mayi.adapter;

import android.content.Context;
import android.view.View;

import com.future.baselib.utils.CommonUtils;
import com.future.mayi.R;
import com.future.mayi.model.IndexActivityModel;
import com.future.mayi.model.IndexIconModel;
import com.future.mayi.model.IndexRecommendModel;

import java.util.List;


public class IndexRecommendAdapter extends CommonAdapter<IndexIconModel> {


    private int itemHeight;

    public IndexRecommendAdapter(Context context, List<IndexIconModel> objects, int itemHeight) {
        super(context, R.layout.item_index_recommend, objects);
        this.itemHeight = itemHeight;
    }

    @Override
    public void convert(ViewHolder helper, IndexIconModel item) {
        helper.setWebImage(R.id.iv_bg, item.getIcon_img());
        View view = helper.getView(R.id.ll_item);
        if (view.getLayoutParams() != null)
            view.getLayoutParams().height = itemHeight;
    }
}
